<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/templates/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{finTransBean.id}"/>
		<f:event type="preRenderView" listener="#{finTransBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Fin Trans"/>

	<ui:define name="header">
		Fin Trans
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty finTransBean.id}">
				Edit existing Fin Trans
			</c:when>
			<c:otherwise>
				Create a new Fin Trans
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="finTransBeanFinTransRecNo" value="Rec No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransRecNo" required="true" value="#{finTransBean.finTrans.recNo}"/>
					<h:message for="finTransBeanFinTransRecNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="finTransBeanFinTransAccPeriodNo" value="Acc Period No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransAccPeriodNo" value="#{finTransBean.finTrans.accPeriodNo}"/>
					<h:message for="finTransBeanFinTransAccPeriodNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransAccPeriodMonthNo" value="Acc Period Month No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransAccPeriodMonthNo" value="#{finTransBean.finTrans.accPeriodMonthNo}"/>
					<h:message for="finTransBeanFinTransAccPeriodMonthNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransFinTransCodeShort" value="Fin Trans Code Short:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransFinTransCodeShort" maxLength="5" value="#{finTransBean.finTrans.finTransCodeShort}"/>
					<h:message for="finTransBeanFinTransFinTransCodeShort" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransFinTransCode" value="Fin Trans Code:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransFinTransCode" maxLength="20" value="#{finTransBean.finTrans.finTransCode}"/>
					<h:message for="finTransBeanFinTransFinTransCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransRecDate" value="Rec Date:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransRecDate" maxLength="10" value="#{finTransBean.finTrans.recDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="finTransBeanFinTransRecDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransOrgNo" value="Org No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransOrgNo" value="#{finTransBean.finTrans.orgNo}"/>
					<h:message for="finTransBeanFinTransOrgNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransLoanContractGrpNo" value="Loan Contract Grp No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransLoanContractGrpNo" value="#{finTransBean.finTrans.loanContractGrpNo}"/>
					<h:message for="finTransBeanFinTransLoanContractGrpNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransFinTransTypeNo" value="Fin Trans Type No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransFinTransTypeNo" value="#{finTransBean.finTrans.finTransTypeNo}"/>
					<h:message for="finTransBeanFinTransFinTransTypeNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransTransAmt" value="Trans Amt:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransTransAmt" required="true" value="#{finTransBean.finTrans.transAmt}"/>
					<h:message for="finTransBeanFinTransTransAmt" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="finTransBeanFinTransDocCode01" value="Doc Code 01:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransDocCode01" maxLength="20" value="#{finTransBean.finTrans.docCode01}"/>
					<h:message for="finTransBeanFinTransDocCode01" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransFromOrgNo" value="From Org No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransFromOrgNo" value="#{finTransBean.finTrans.fromOrgNo}"/>
					<h:message for="finTransBeanFinTransFromOrgNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransToOrgNo" value="To Org No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransToOrgNo" value="#{finTransBean.finTrans.toOrgNo}"/>
					<h:message for="finTransBeanFinTransToOrgNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransFromBankNo" value="From Bank No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransFromBankNo" value="#{finTransBean.finTrans.fromBankNo}"/>
					<h:message for="finTransBeanFinTransFromBankNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransToBankNo" value="To Bank No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransToBankNo" value="#{finTransBean.finTrans.toBankNo}"/>
					<h:message for="finTransBeanFinTransToBankNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransTransStartDate" value="Trans Start Date:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransTransStartDate" maxLength="10" value="#{finTransBean.finTrans.transStartDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="finTransBeanFinTransTransStartDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransTransEndDate" value="Trans End Date:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransTransEndDate" maxLength="10" value="#{finTransBean.finTrans.transEndDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="finTransBeanFinTransTransEndDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransComment" value="Comment:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransComment" maxLength="200" value="#{finTransBean.finTrans.comment}"/>
					<h:message for="finTransBeanFinTransComment" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransStatusPosted" value="Status Posted:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransStatusPosted" value="#{finTransBean.finTrans.statusPosted}"/>
					<h:message for="finTransBeanFinTransStatusPosted" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransCreatedUserNo" value="Created User No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransCreatedUserNo" value="#{finTransBean.finTrans.createdUserNo}"/>
					<h:message for="finTransBeanFinTransCreatedUserNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransCreatedDtm" value="Created Dtm:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransCreatedDtm" maxLength="19" value="#{finTransBean.finTrans.createdDtm}">
						<f:convertDateTime pattern="MMM d, yyyy hh:mm:ss a" type="both"/>
					</h:inputText>
					<h:message for="finTransBeanFinTransCreatedDtm" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransPayPartNo" value="Pay Part No:"/>
				<h:panelGroup>
					<h:inputText id="finTransBeanFinTransPayPartNo" value="#{finTransBean.finTrans.payPartNo}"/>
					<h:message for="finTransBeanFinTransPayPartNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransFinTransTmd02FromOrgs" value="Fin Trans Tmd 02From Orgs:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{finTransBean.finTrans.finTransTmd02FromOrgs}"/>
					<h:dataTable id="finTransBeanFinTransFinTransTmd02FromOrgs" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransFinTransTmd02FromSubOrgs" value="Fin Trans Tmd 02From Sub Orgs:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{finTransBean.finTrans.finTransTmd02FromSubOrgs}"/>
					<h:dataTable id="finTransBeanFinTransFinTransTmd02FromSubOrgs" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="finTransBeanFinTransFinTransDetails" value="Fin Trans Details:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{finTransBean.finTrans.finTransDetails}"/>
					<h:dataTable id="finTransBeanFinTransFinTransDetails" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Acc No"/>
							</f:facet>
							<h:link outcome="/form/finTransDetail/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemAccNo" value="#{_item.accNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="finTransDetailBeanAddAccNo" value="#{finTransDetailBean.add.accNo}"/>
								<h:message for="finTransDetailBeanAddAccNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Flag Dr Cr"/>
							</f:facet>
							<h:link outcome="/form/finTransDetail/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemFlagDrCr" value="#{_item.flagDrCr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="finTransDetailBeanAddFlagDrCr" value="#{finTransDetailBean.add.flagDrCr}"/>
								<h:message for="finTransDetailBeanAddFlagDrCr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Jn Amt Dr"/>
							</f:facet>
							<h:link outcome="/form/finTransDetail/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemJnAmtDr" value="#{_item.jnAmtDr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="finTransDetailBeanAddJnAmtDr" value="#{finTransDetailBean.add.jnAmtDr}"/>
								<h:message for="finTransDetailBeanAddJnAmtDr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Jn Amt Cr"/>
							</f:facet>
							<h:link outcome="/form/finTransDetail/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemJnAmtCr" value="#{_item.jnAmtCr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="finTransDetailBeanAddJnAmtCr" value="#{finTransDetailBean.add.jnAmtCr}"/>
								<h:message for="finTransDetailBeanAddJnAmtCr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Status Posted"/>
							</f:facet>
							<h:link outcome="/form/finTransDetail/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemStatusPosted" value="#{_item.statusPosted}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="finTransDetailBeanAddStatusPosted" value="#{finTransDetailBean.add.statusPosted}"/>
								<h:message for="finTransDetailBeanAddStatusPosted" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(finTransDetailBean.added)}" id="finTransBeanFinTransFinTransDetailsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{finTransDetailBean.add.finTrans}" value="#{finTransBean.finTrans}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{finTransBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty finTransBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{finTransBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{finTransBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>